home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / ViewIt™ 2.24 Shareware / FORTRAN Demo Projects / LS Fortran 3.3 Demos / TutorialLF.f < prev    next >
Text File  |  1993-07-08  |  2KB  |  59 lines

  1. C NOTE: Read the "MPW Fortrans" section of "About Compilers"
  2. C before compiling LF programs that use FaceWare modules.
  3.  
  4. C Tutorial LF Demonstration Program
  5. C ©FaceWare 1993.  All Rights Reserved.
  6.  
  7. !!M Inlines.f
  8. !!I FaceProcLF.inc
  9.  
  10.       PROGRAM TutorialLF
  11.     implicit none
  12. C NOTE: If you use the "!!G" directive for precompiled globals, add
  13. C our FaceStorLF.inc globals to yours and then remove following line
  14.     include 'FaceStorLF.inc'
  15.       record /FaceRec/ fRec
  16.       common/FaceStuff/fRec
  17.     integer*2 theFlag,theListItem,theMenuItem
  18.     character*32 theString
  19.  
  20.       fRec.uName = 'Tutorial.Rsrc'
  21.       call FaceIt(0,DoInit,0,0,0,0)
  22.     theFlag = 0
  23.     theListItem = 3
  24.     theMenuItem = 2
  25.     theString = 'Hello'
  26.  
  27.       do while (.true.)
  28.         call FaceIt(0,DoLoop,0,0,0,0)
  29.       if ((fRec.uMenuID = 105).and.(fRec.uMenuItem = 1)) then
  30.         call FaceIt(0,NewWnd,1010,0,0,0)
  31.         call FaceIt(0,GetCtl,1010,0,1,3)
  32.         call FaceIt(0,LnkCtl,fRec.cControl,%loc(theFlag),2,0)
  33.         call FaceIt(0,GetCtl,1010,0,1,4)
  34.         call FaceIt(0,LnkCtl,fRec.cControl,%loc(theString),-31,0)
  35.         call FaceIt(0,GetCtl,1010,0,1,5)
  36.         call FaceIt(0,LnkCtl,fRec.cControl,%loc(theListItem),2,0)
  37.         call FaceIt(0,GetCtl,1010,0,1,6)
  38.         call FaceIt(0,LnkCtl,fRec.cControl,%loc(theMenuItem),2,0)
  39.         call FaceIt(0,SetVal,1010,0,0,0)
  40.         do while (.true.)
  41.           call FaceIt(0,MdlWnd,1010,0,0,0)
  42.         if (fRec.uMenuID = 1010) then
  43.           if (fRec.wcHit = -1) then
  44.             exit
  45.           else if (fRec.wcHit = 1) then
  46.             call FaceIt(0,GetVal,1010,0,0,0)
  47.             exit
  48.           else if (fRec.wcHit = 2) then
  49.             call FaceIt(0,GetCtl,1010,0,1,8)
  50.             fRec.uString = 'Run button was hit.'
  51.             call FaceIt(fRec.cControl,1565,2,0,0,0)
  52.           end if
  53.         end if
  54.         end do
  55.         call FaceIt(0,EndWnd,1010,0,0,0)
  56.       end if
  57.     end do
  58.     end
  59.